package com.yuncheng.spcyApi.webOffice;

import cn.hutool.core.date.DateUtil;
import com.yuncheng.annotation.AutoLog;
import com.yuncheng.spcyApi.busService.BusService;
import com.yuncheng.spcyApi.constant.common.BusinessConstant;
import com.yuncheng.spcyApi.constant.common.LogConstant;
import com.yuncheng.spcyApi.constant.common.SpcyConstant;
import com.yuncheng.spcyApi.constant.wjml.WjmlConstant;
import com.yuncheng.spcyApi.entity.SpcySqsxWjjl;
import com.yuncheng.spcyApi.service.*;
import com.yuncheng.spcyApi.utils.GetUuIdUtils;
import com.yuncheng.spcyApi.utils.HnCaUtils;
import com.yuncheng.spcyApi.utils.LocalFileUploadUtils;
import com.yuncheng.vo.HttpResult;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import utils.*;

import javax.annotation.Resource;
import javax.servlet.ServletInputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * @Description: 审评查验-客户端在线编辑文档接口
 * @Author: csx
 * @Date: 2023-03-03
 * @Version: V1.0
 */
//@Api(tags = "审评查验-客户端在线编辑文档接口")
//@RestController
//@RequestMapping("/api/spzx-spcy/clientWebOfficeApi")
public class ClientWebOfficeApi {

    private static final Logger log = LoggerFactory.getLogger(ClientWebOfficeApi.class);

    @Resource
    private ISpcyLogService spcyLogService;

    @Resource
    private LocalFileUploadUtils localFileUploadUtils;

    @Resource
    private BusinessConstant businessConstant;

    @Resource
    private HnCaUtils hnCaUtils;

    @Resource
    private ISpcySqsxWjjlService spcySqsxWjjlService;

    @Resource
    private BusService busService;

    /**
     * 申请事项-文件在线编辑
     * @param response
     */
    @AutoLog(value = "申请事项-文件在线编辑-打开文件")
    @ApiOperation(value = "申请事项-文件在线编辑-打开文件")
    @ApiImplicitParam(name = "id",value = "文件id",required = true)
    @GetMapping(value = "openWjjl")
    public void openWjjl(@RequestParam("id")String id,HttpServletResponse response){
        if (StringUtils.isBlank(id)){
            log.error("【文件在线编辑】-文件id不能为空");
            return;
        }
        SpcySqsxWjjl wjjl = spcySqsxWjjlService.getById(id);
        if (wjjl == null){
            log.error("【文件在线编辑】-文件id:{}的数据不存在",id);
            return;
        }
        if (StringUtils.isNotBlank(wjjl.getFcflj())){
            localFileUploadUtils.ejzLocalFileURl(wjjl.getFcflj(),response);
        }else {
            log.error("【文件在线编辑】- 文件存放路径不存在");
            return;
        }
    }

    /**
     * 申请事项-在线编辑-保存文件
     */
    @AutoLog(value = "申请事项-在线编辑-保存文件")
    @ApiOperation(value = "申请事项-在线编辑-保存文件")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "docfile",value = "保存的文件",required = true),
            @ApiImplicitParam(name = "id",value = "文件id",required = true)
    })
    @PostMapping(value = "onLineSaveWjjl")
    public HttpResult<?> onLineSaveWjjl(@RequestParam("docfile") MultipartFile file,String id){
        if (StringUtils.isBlank(id)){
            return HttpResult.error("文件id不能为空");
        }
        SpcySqsxWjjl wjjl = spcySqsxWjjlService.getById(id);
        if (wjjl == null){
            return HttpResult.error("文件数据不存在，请重试");
        }
        Map<String, Object> oldMap = ObjectToMapUtils.objectToMap(wjjl);

        String oldCflj = wjjl.getFcflj(); // 旧文件存放路径

        String originalFilename = file.getOriginalFilename();

        if (originalFilename.lastIndexOf(".") == 0){
            return HttpResult.error("文件不存在这个格式，请联系管理员");
        }
        // 文件类型
        String wjlx = ".doc";
        // 文件名

        String sjmc = GetUuIdUtils.NotReplaceUuId();
        String wjccmc = sjmc + wjlx;
        String nowDay = DateConversionUtils.DateToMonthTwo(new Date()); // 获取当前日期 yyyy-MM-dd
        String newDir = "/"+nowDay;
        File newFile = new File(localFileUploadUtils.getSqsxWjjlAbsUrl(newDir));
        if (!newFile.exists()){
            newFile.mkdirs();
        }
        String cflj = newDir + "/" + wjccmc;

        localFileUploadUtils.uploadOnlineFile(file, sjmc,wjlx); // 上传文件
        String wordText = InsertAndOutWordUtils.getWordText(localFileUploadUtils.getSqsxWjjlAbsUrl(cflj), wjlx); // 获取文件内容
        if (StringUtils.isNotBlank(wordText)){
            wordText = wordText.replace(BusinessConstant.HNCA_WJZ," ");
        }

        wjjl.setFwjnr(wordText);
        wjjl.setFwjlx(wjlx);
        wjjl.setFwjccmc(wjccmc);
        wjjl.setFcflj(cflj);
        spcySqsxWjjlService.updateById(wjjl);

        String log = "文件在线编辑: ";
        log += LogUtils.BeanModifyMsg(wjjl,oldMap);
        spcyLogService.addLogs(LogConstant.LOGS_SQSX_WJJL,log,id,LogConstant.LOGS_SQSX_WJJL,SpcyConstant.LOGS_SYS_TYPE_XG);

        localFileUploadUtils.deleteLocalWjmbFileUrl(oldCflj); // 删除旧的文件

        return HttpResult.ok("保存文件成功");
    }

    @AutoLog(value = "在线编辑-将文件保存为PDF并盖章-通过文件id")
    @ApiOperation(value = "在线编辑-将文件保存为PDF并盖章-通过文件id")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "sqsxid",value = "申请事项id",required = true),
            @ApiImplicitParam(name = "id",value = "文件id",required = true)
    })
    @PostMapping(value = "saveFileGzToPdf")
    public void saveFileGzToPdf(HttpServletRequest request){
        String sqsxid = request.getParameter("sqsxid");
        String fileId = request.getParameter("id");
        SpcySqsxWjjl oldWjjl = spcySqsxWjjlService.getById(fileId);
        if (oldWjjl == null){
            return;
        }
        String nowNodeName = "";
        if (StringUtils.isNotBlank(sqsxid)){
            nowNodeName = busService.getNowNodeName(sqsxid);
        }

        String nowDay = DateUtil.today(); // 获取当前日期 yyyy-MM-dd
        String newDir = "/"+nowDay;
        File newFile = new File(localFileUploadUtils.getSqsxWjjlAbsUrl(newDir));
        if (!newFile.exists()){
            newFile.mkdirs();
        }

        String fileName = GetUuIdUtils.NotReplaceUuId(); // 虚拟名称
        String fileType = ".pdf";
        fileName += fileType;
        String xnUrl = newDir + "/" +fileName;

        String uploadUrl = localFileUploadUtils.getSqsxWjjlAbsUrl(xnUrl);
        ServletInputStream inputStream = null;
        try {
            inputStream = request.getInputStream();
        } catch (IOException e) {
            log.error("将文件保存word为PDF失败【IOException】：{}",e.getMessage());
        }
        localFileUploadUtils.uploadEjzFile(inputStream,uploadUrl); // 上传文件

        // 修改文件地址
        if (oldWjjl != null){
            String oldWjxsmc = oldWjjl.getFwjxsmc();
            String oldCflj = oldWjjl.getFcflj();
            String oldWjccmc = oldWjjl.getFwjccmc();
            String oldWjlx = oldWjjl.getFwjlx();

            oldWjjl.setFwjlx(fileType);
            oldWjjl.setFcflj(xnUrl);
            oldWjjl.setFwjccmc(fileName);
            oldWjjl.setFjdcflj(oldCflj); // 旧的存放路径
            spcySqsxWjjlService.updateById(oldWjjl);

//            localFileUploadUtils.deleteLocalFileUrl(oldCflj); // 删除文件

            // 方案盖骑缝章
            if (StringUtils.isNotBlank(oldWjjl.getFwjlx1()) && (oldWjjl.getFwjlx1().equals(WjmlConstant.jcfa)
                    || oldWjjl.getFwjlx1().equals(WjmlConstant.spfa))) {
                hnCaUtils.fileCaByGJZ(oldWjjl.getId()); // 文件盖章
            }else {
                hnCaUtils.fileCaByGJZ(oldWjjl.getId()); // 文件盖章
            }

            String operContent = "【文件名】为["+oldWjxsmc+"];" +
                    "【文件路径】从["+oldCflj+"]设置为["+xnUrl+"];" +
                    "【文件虚拟名】从["+oldWjccmc+"]设置为["+fileName+"];" +
                    "【文件类型】从["+oldWjlx+"]设置为["+fileType+"]";
            spcyLogService.addLogs(nowNodeName,operContent,sqsxid,LogConstant.LOGS_SQSX_WJJL,SpcyConstant.LOGS_SYS_TYPE_XG);
        }

    }

    @AutoLog(value = "在线编辑-将文件保存为PDF并盖章-以文件形式")
    @ApiOperation(value = "在线编辑-将文件保存为PDF并盖章-以文件形式")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "sqsxid",value = "申请事项id",required = true),
            @ApiImplicitParam(name = "id",value = "文件id",required = true)
    })
    @PostMapping(value = "saveFileGzToPdf2")
    public void saveFileGzToPdf(@RequestParam("pdffile") MultipartFile file,
                                @RequestParam("docfile") MultipartFile file2,
                                @RequestParam("id") String fileId,
                                @RequestParam("sqsxid") String sqsxid,
                                @RequestParam(value = "filename",defaultValue = "")String filename,
                                HttpServletRequest request){
//        String sqsxid = request.getParameter("sqsxid");
//        String fileId = request.getParameter("id");
//        System.out.println(filename);
        SpcySqsxWjjl oldWjjl = spcySqsxWjjlService.getById(fileId);
        if (oldWjjl == null){
            return;
        }
        String nowNodeName = "";
        if (StringUtils.isNotBlank(sqsxid)){
            nowNodeName = busService.getNowNodeName(sqsxid);
        }

        String nowDay = DateConversionUtils.DateToMonthTwo(new Date()); // 获取当前日期 yyyy-MM-dd
        String newDir = "/"+nowDay;
        File newFile = new File(localFileUploadUtils.getSqsxWjjlAbsUrl(newDir));
        if (!newFile.exists()){
            newFile.mkdirs();
        }

        String fileName = GetUuIdUtils.NotReplaceUuId(); // 虚拟名称
        String sjmc = fileName;
        String fileType = ".pdf";
        fileName += fileType;
        String xnUrl = newDir + "/" +fileName;


        localFileUploadUtils.uploadOnlineFile(file, sjmc,fileType); // 上传文件

        // 修改文件地址
        if (oldWjjl != null){
            String oldWjxsmc = oldWjjl.getFwjxsmc();
            String oldCflj = oldWjjl.getFcflj();
            String oldWjccmc = oldWjjl.getFwjccmc();
            String oldWjlx = oldWjjl.getFwjlx();

            oldWjjl.setFwjlx(fileType);
            oldWjjl.setFcflj(xnUrl);
            oldWjjl.setFwjccmc(fileName);
            oldWjjl.setFjdcflj(oldCflj); // 旧的存放路径
            spcySqsxWjjlService.updateById(oldWjjl);

//            localFileUploadUtils.deleteLocalFileUrl(oldCflj); // 删除文件

            // 方案盖骑缝章
            if (StringUtils.isNotBlank(oldWjjl.getFwjlx1()) && (oldWjjl.getFwjlx1().equals(WjmlConstant.jcfa)
                    || oldWjjl.getFwjlx1().equals(WjmlConstant.spfa))) {
                hnCaUtils.fileCaByGJZ(oldWjjl.getId()); // 文件盖章
            }else {
                hnCaUtils.fileCaByGJZ(oldWjjl.getId()); // 文件盖章
            }

            String operContent = "【文件名】为["+oldWjxsmc+"];" +
                    "【文件路径】从["+oldCflj+"]设置为["+xnUrl+"];" +
                    "【文件虚拟名】从["+oldWjccmc+"]设置为["+fileName+"];" +
                    "【文件类型】从["+oldWjlx+"]设置为["+fileType+"]";
            spcyLogService.addLogs(nowNodeName,operContent,sqsxid,LogConstant.LOGS_SQSX_WJJL,SpcyConstant.LOGS_SYS_TYPE_XG);
        }

    }

    @AutoLog(value = "在线编辑-将文件保存为PDF-通过文件id")
    @ApiOperation(value = "在线编辑-将文件保存为PDF-通过文件id")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "sqsxid",value = "申请事项id",required = true),
            @ApiImplicitParam(name = "id",value = "文件id",required = true)
    })
    @PostMapping(value = "saveFileToPdf")
    public void saveFileToPdf(HttpServletRequest request){
        String sqsxid = request.getParameter("sqsxid");
        String fileId = request.getParameter("id");
        SpcySqsxWjjl oldWjjl = spcySqsxWjjlService.getById(fileId);
        if (oldWjjl == null){
            return;
        }
        String nowNodeName = "";
        if (StringUtils.isNotBlank(sqsxid)){
            nowNodeName = busService.getNowNodeName(sqsxid);
        }

        String nowDay = DateUtil.today(); // 获取当前日期 yyyy-MM-dd
        String newDir = "/"+nowDay;

        File newFile = new File(localFileUploadUtils.getSqsxWjjlAbsUrl(newDir));
        if (!newFile.exists()){
            newFile.mkdirs();
        }

        String fileName = GetUuIdUtils.NotReplaceUuId(); // 虚拟名称
        String fileType = ".pdf";
        fileName += fileType;
        String xnUrl = newDir + "/" +fileName;

        String uploadUrl = localFileUploadUtils.getSqsxWjjlAbsUrl(xnUrl);
        ServletInputStream inputStream = null;
        try {
            inputStream = request.getInputStream();
        } catch (IOException e) {
            log.error("将文件保存word为PDF失败【IOException】：{}",e.getMessage());
        }
        localFileUploadUtils.uploadEjzFile(inputStream,uploadUrl); // 上传文件

        // 修改文件地址
        if (oldWjjl != null){
            String oldWjxsmc = oldWjjl.getFwjxsmc();
            String oldCflj = oldWjjl.getFcflj();
            String oldWjccmc = oldWjjl.getFwjccmc();
            String oldWjlx = oldWjjl.getFwjlx();
            String fgzzt = oldWjjl.getFgzzt();
            // 判断盖章
            if (StringUtils.isNotBlank(fgzzt) && fgzzt.equals(SpcyConstant.WJJL_ZT_GZ)){
                oldWjjl.setFgzzt(SpcyConstant.WJJL_ZT_GZ_NO);
            }

            oldWjjl.setFwjlx(fileType);
            oldWjjl.setFcflj(xnUrl);
            oldWjjl.setFwjccmc(fileName);
            oldWjjl.setFjdcflj(oldCflj);
            spcySqsxWjjlService.updateById(oldWjjl);

//            localFileUploadUtils.deleteLocalFileUrl(oldCflj); // 删除文件

            String operContent = "生成PDF文件:【文件名】为["+oldWjxsmc+"];" +
                    "【文件路径】从["+oldCflj+"]设置为["+xnUrl+"];" +
                    "【文件虚拟名】从["+oldWjccmc+"]设置为["+fileName+"];" +
                    "【文件类型】从["+oldWjlx+"]设置为["+fileType+"]";
            spcyLogService.addLogs(nowNodeName,operContent,sqsxid,LogConstant.LOGS_SQSX_WJJL,SpcyConstant.LOGS_SYS_TYPE_XG);
        }

    }

    @AutoLog(value = "在线编辑-将文件保存为PDF-通过文件id")
    @ApiOperation(value = "在线编辑-将文件保存为PDF-通过文件id")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "sqsxid",value = "申请事项id",required = true),
            @ApiImplicitParam(name = "id",value = "文件id",required = true)
    })
    @PostMapping(value = "saveFileToPdf2")
    public void saveFileToPdf(@RequestParam("pdffile") MultipartFile file,
                              @RequestParam("docfile") MultipartFile file2,
                              @RequestParam("id") String fileId,
                              @RequestParam("sqsxid") String sqsxid,
                              @RequestParam(value = "filename",defaultValue = "")String filename,
                              HttpServletRequest request){
//        String sqsxid = request.getParameter("sqsxid");
//        String fileId = request.getParameter("id");
        SpcySqsxWjjl oldWjjl = spcySqsxWjjlService.getById(fileId);
        if (oldWjjl == null){
            return;
        }
        String nowNodeName = "";
        if (StringUtils.isNotBlank(sqsxid)){
            nowNodeName = busService.getNowNodeName(sqsxid);
        }

        String nowDay = DateConversionUtils.DateToMonthTwo(new Date()); // 获取当前日期 yyyy-MM-dd
        String newDir = "/"+nowDay;

        File newFile = new File(localFileUploadUtils.getSqsxWjjlAbsUrl(newDir));
        if (!newFile.exists()){
            newFile.mkdirs();
        }

        String fileName = GetUuIdUtils.NotReplaceUuId(); // 虚拟名称
        String sjmc = fileName;
        String fileType = ".pdf";
        fileName += fileType;
        String xnUrl = newDir + "/" +fileName;


        localFileUploadUtils.uploadOnlineFile(file, sjmc,fileType); // 上传文件

        // 修改文件地址
        if (oldWjjl != null){
            String oldWjxsmc = oldWjjl.getFwjxsmc();
            String oldCflj = oldWjjl.getFcflj();
            String oldWjccmc = oldWjjl.getFwjccmc();
            String oldWjlx = oldWjjl.getFwjlx();
            String fgzzt = oldWjjl.getFgzzt();
            // 判断盖章
            if (StringUtils.isNotBlank(fgzzt) && fgzzt.equals(SpcyConstant.WJJL_ZT_GZ)){
                oldWjjl.setFgzzt(SpcyConstant.WJJL_ZT_GZ_NO);
            }

            oldWjjl.setFwjlx(fileType);
            oldWjjl.setFcflj(xnUrl);
            oldWjjl.setFwjccmc(fileName);
            oldWjjl.setFjdcflj(oldCflj);
            spcySqsxWjjlService.updateById(oldWjjl);

//            localFileUploadUtils.deleteLocalFileUrl(oldCflj); // 删除文件

            String operContent = "生成PDF文件:【文件名】为["+oldWjxsmc+"];" +
                    "【文件路径】从["+oldCflj+"]设置为["+xnUrl+"];" +
                    "【文件虚拟名】从["+oldWjccmc+"]设置为["+fileName+"];" +
                    "【文件类型】从["+oldWjlx+"]设置为["+fileType+"]";
            spcyLogService.addLogs(nowNodeName,operContent,sqsxid,LogConstant.LOGS_SQSX_WJJL,SpcyConstant.LOGS_SYS_TYPE_XG);
        }

    }

    @AutoLog(value = "重新编辑PDF文件")
    @ApiOperation(value = "重新编辑PDF文件")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(value = "id",name = "文件id",required = true)
    })
    @GetMapping(value = "againEditPdfFile")
    public HttpResult<?> againEditPdfFile(@RequestParam("id")String id){
        if (StringUtils.isBlank(id)){
            log.error("文件参数不能为空");
            return HttpResult.error("文件参数不能为空");
        }
        SpcySqsxWjjl wjjl = spcySqsxWjjlService.getById(id);
        if (wjjl == null){
            log.error("文件记录不存在");
            return HttpResult.error("文件记录不存在");
        }
        String nowNodeName = "";
        if (StringUtils.isNotBlank(wjjl.getFpid())){
            nowNodeName = busService.getNowNodeName(wjjl.getFpid());
        }
        Map<String, Object> oldMap = ObjectToMapUtils.objectToMap(wjjl);

        String fjdcflj = wjjl.getFjdcflj(); // 旧的文件路径
        String oldWjlx = Util.getWjHz(fjdcflj); // 旧的文件类型
        localFileUploadUtils.deleteLocalFileUrl(wjjl.getFcflj()); // 删除文件
        wjjl.setFwjlx(oldWjlx);
        wjjl.setFcflj(fjdcflj);
        wjjl.setFgzzt(SpcyConstant.WJJL_ZT_GZ_NO);
        wjjl.setFdxzt(SpcyConstant.WJJL_ZT_DX_NO);
        wjjl.setFyxzt(SpcyConstant.WJJL_ZT_YX_NO);
        spcySqsxWjjlService.updateById(wjjl);

        String logNr = "重新编辑PDF文件"+wjjl.getFwjlx1()+"：文件名【"+wjjl.getFwjxsmc()+"】;";
        logNr += LogUtils.BeanModifyMsg(wjjl,oldMap);
        spcyLogService.addLogs(nowNodeName,logNr,wjjl.getFpid(),LogConstant.LOGS_SQSX_WJJL,SpcyConstant.LOGS_SYS_TYPE_XG);

    /*if (StringUtils.isNotBlank(fjdcflj)){
        localFileUploadUtils.ejzLocalFileURl(fjdcflj,response);
    }else {
        log.error("【文件在线编辑】- 文件存放路径不存在");
        return;
    }*/
        Map map = new HashMap();
        map.put("id",wjjl.getId());
        return HttpResult.ok(map);
    }

    @AutoLog(value = "重新编辑PDF文件-并输出文件")
    @ApiOperation(value = "重新编辑PDF文件-并输出文件")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(value = "id",name = "文件id",required = true)
    })
    @GetMapping(value = "againEditOutPdfFile")
    public void againEditOutPdfFile(@RequestParam("id")String id,HttpServletResponse response){
        if (StringUtils.isBlank(id)){
            log.error("文件参数不能为空");
//            return HttpResult.error("文件参数不能为空");
        }
        SpcySqsxWjjl wjjl = spcySqsxWjjlService.getById(id);
        if (wjjl == null){
            log.error("文件记录不存在");
//            return HttpResult.error("文件记录不存在");
        }
        String nowNodeName = "";
        if (StringUtils.isNotBlank(wjjl.getFpid())){
            nowNodeName = busService.getNowNodeName(wjjl.getFpid());
        }
        Map<String, Object> oldMap = ObjectToMapUtils.objectToMap(wjjl);

        if (StringUtils.isBlank(wjjl.getFjdcflj())){
            log.error("重新编辑PDF文件-并输出文件: 旧的文件路径为空");
            return;
        }
        String fjdcflj = wjjl.getFjdcflj(); // 旧的文件路径
        String oldWjlx = Util.getWjHz(fjdcflj); // 旧的文件类型
        localFileUploadUtils.deleteLocalFileUrl(wjjl.getFcflj()); // 删除文件
        wjjl.setFwjlx(oldWjlx);
        wjjl.setFcflj(fjdcflj);
        wjjl.setFgzzt(SpcyConstant.WJJL_ZT_GZ_NO);
        wjjl.setFdxzt(SpcyConstant.WJJL_ZT_DX_NO);
        wjjl.setFyxzt(SpcyConstant.WJJL_ZT_YX_NO);
        spcySqsxWjjlService.updateById(wjjl);

        String logNr = "重新编辑PDF文件"+wjjl.getFwjlx1()+"：文件名【"+wjjl.getFwjxsmc()+"】;";
        logNr += LogUtils.BeanModifyMsg(wjjl,oldMap);
        spcyLogService.addLogs(nowNodeName,logNr,wjjl.getFpid(),LogConstant.LOGS_SQSX_WJJL,SpcyConstant.LOGS_SYS_TYPE_XG);

        if (StringUtils.isNotBlank(fjdcflj)){
            localFileUploadUtils.ejzLocalFileURl(fjdcflj,response);
        }else {
            log.error("【文件在线编辑】- 文件存放路径不存在");
            return;
        }
//        Map map = new HashMap();
//        map.put("id",wjjl.getId());
//        return HttpResult.ok(map);
    }
}

